#include<stdio.h>
#include<unistd.h>
#include<stdlib.h>
#include<string.h>

int main(int argc, char* argv[], char* env[])
{
  (void)argc;
  (void)argv;
  (void)env;
  
  const char* u = getenv("USER");

  if(strcmp("zy", u) == 0)
  {
    int id = fork();
    if(id == 0)
    {
      printf("son pid:%d | ppid:%d\n", getpid(), getppid());
      sleep(2);
    }
    else 
    {
      printf("parent pid:%d | ppid:%d\n", getpid(), getppid());
      sleep(2);
    }
  }
  return 0;
}
